<div id="filename"><!--{$Filename}--></div>
<div id="error"><!--{$Error}--></div>
<script type="text/javascript">
    var filename=document.getElementById('filename');
    var error=document.getElementById('error');
    if(''!==filename.innerHTML){
        parent.$('#'+parent.$('#control').val()).val(filename.innerHTML);
        parent.$('#uploaderror').html('上传成功');
        window.setTimeout(function(){
            parent.$('#myModal').modal('toggle');
            parent.$('#uploaderror').html('');
            parent.$('#uploadbutton').attr('disabled',false);
            parent.$('#closeButton').show();
            //parent.$('#file').remove();
        },1000);
    }
    else{
        parent.$('#uploaderror').html(error.innerHTML);
    }
</script>